<?php

use yii\helpers\Html;
use yii\widgets\DetailView;

/* @var $this yii\web\View */
/* @var $model common\models\ExhibitionHall */

$this->title = $model->title;
$this->params['breadcrumbs'][] = ['label' => Yii::t('common', 'exhibition_hall'), 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="exhibition-hall-view">

    <p>
        <?= Html::a(Yii::t('common', 'update'), ['update', 'id' => $model->id], ['class' => 'btn btn-primary']) ?>
        <?= Html::a(Yii::t('common', 'delete'), ['delete', 'id' => $model->id], [
            'class' => 'btn btn-danger',
            'data' => [
                'confirm' => Yii::t('common', 'are_you_sure_you_want_to_delete_this_item?'),
                'method' => 'post',
            ],
        ]) ?>
    </p>

    <?= DetailView::widget([
        'model' => $model,
        'attributes' => [
            //'id',
            'title',
            [
                'attribute' => Yii::t('common', 'city'),
                'value' => \common\models\Region::getRegionName($model->region_id)
            ],
            'banner:image',
            'litpic:image',
            'hotpic:image',
            'area',
            'introduce:html',
            'address',
            'lat',
            'lng',
            [
                'attribute' => Yii::t('common', 'recommend'),
                'value' => \common\helpers\TStringHelper::getYesOrNo($model->recommend)
            ],
            'views_num',
            'order',
            [
                'attribute' => Yii::t('common', 'status'),
                'value' => \common\helpers\TStringHelper::getStatusText($model->status)
            ],
        ],
        'template' => '<tr><th width="100px">{label}</th><td>{value}</td></tr>',
    ]) ?>

</div>
